Latent semantic analysis (LSA) is a technique in natural language processing, in particular in vectorial semantics, of analyzing relationships between a set of documents and the terms they contain by producing a set of concepts related to the documents and terms. LSA assumes that words that are close in meaning will occur close together in text. A matrix containing word counts per paragraph (rows represent unique words and columns represent each paragraph) is constructed from a large piece of text and a mathematical technique called singular value decomposition (SVD) is used to reduce the number of columns while preserving the similarity structure among rows. Words are then compared by taking the cosine of the angle between the two vectors formed by any two rows. Values close to 1 represent very similar words while values close to 0 represent very dissimilar words.[1]
LSA was patented in 1988 (US Patent 4,839,853) by Scott Deerwester, Susan Dumais, George Furnas, Richard Harshman, Thomas Landauer, Karen Lochbaum and Lynn Streeter. In the context of its application to information retrieval, it is sometimes called Latent Semantic Indexing (LSI).[2]
Contents[hide] |
LSA can use a term-document matrix which describes the occurrences of terms in documents; it is a sparse matrix whose rows correspond to terms and whose columns correspond to documents. A typical example of the weighting of the elements of the matrix is tf-idf (term frequency–inverse document frequency): the element of the matrix is proportional to the number of times the terms appear in each document, where rare terms are upweighted to reflect their relative importance.
This matrix is also common to standard semantic models, though it is not necessarily explicitly expressed as a matrix, since the mathematical properties of matrices are not always used.
After the construction of the occurrence matrix, LSA finds a low-rank approximation to the term-document matrix. There could be various reasons for these approximations:
The consequence of the rank lowering is that some dimensions are combined and depend on more than one term:
This mitigates the problem of identifying synonymy, as the rank lowering is expected to merge the dimensions associated with terms that have similar meanings. It also mitigates the problem with polysemy, since components of polysemous words that point in the "right" direction are added to the components of words that share a similar meaning. Conversely, components that point in other directions tend to either simply cancel out, or, at worst, to be smaller than components in the directions corresponding to the intended sense.
Let be a matrix where element describes the occurrence of term in document (this can be, for example, the frequency). will look like this:
Now a row in this matrix will be a vector corresponding to a term, giving its relation to each document:
Likewise, a column in this matrix will be a vector corresponding to a document, giving its relation to each term:
Now the dot product between two term vectors gives the correlation between the terms over the documents. The matrix product contains all these dot products. Element (which is equal to element ) contains the dot product (). Likewise, the matrix contains the dot products between all the document vectors, giving their correlation over the terms: .
Now assume that there exists a decomposition of such that and are orthogonal matrices and is a diagonal matrix. This is called a singular value decomposition (SVD):
The matrix products giving us the term and document correlations then become
Since and are diagonal we see that must contain the eigenvectors of , while must be the eigenvectors of . Both products have the same non-zero eigenvalues, given by the non-zero entries of , or equally, by the non-zero entries of . Now the decomposition looks like this:
The values are called the singular values, and and the left and right singular vectors. Notice the only part of that contributes to is the row. Let this row vector be called . Likewise, the only part of that contributes to is the column, . These are not the eigenvectors, but depend on all the eigenvectors.
It turns out that when you select the largest singular values, and their corresponding singular vectors from and , you get the rank approximation to X with the smallest error (Frobenius norm). This approximation has a minimal error. But more importantly we can now treat the term and document vectors as a "semantic space". The vector then has entries mapping it to a lower dimensional space dimensions. These new dimensions do not relate to any comprehensibly concepts. They are a lower dimensional approximation of the higher dimensional space. Likewise, the vector is an approximation in this lower dimensional space. We write this approximation as
You can now do the following:
To do the latter, you must first translate your query into the low dimensional space. It is then intuitive that you must use the same transformation that you use on your documents:
This means that if you have a query vector , you must do the translation before you compare it with the document vectors in the low dimensional space. You can do the same for pseudo term vectors:
The new low dimensional space typically can be used to:
Synonymy and polysemy are fundamental problems in natural language processing:
The use of Latent Semantic Analysis has been prevalent in the study of human memory, especially in areas of free recall and memory search. Howard and Kahana found a positive correlation between the semantic similarity of two words (as measured by LSA) and the probability that the words would be recalled one after another in free recall tasks using study lists of random common nouns. They also noted that in these situations, the inter-response time between the similar words was much quicker than between dissimilar words. These findings are referred to as the Semantic Proximity Effect.[4]
Expanding on these semantic proximity effects, in 2006 Zaromb et al. found that when participants made mistakes in recalling studied items, these mistakes tended to be items that were more semantically related to the desired item and found in a previously studied list. These prior-list intrusions, as they have come to be called, seem to compete with items on the current list for recall. Zaromb et al. found that the PLIs had larger cosine values to the just-recalled word in LSA space than the correct item did.[5]
Another model, termed Word Association Spaces (WAS) is also used in memory studies and was developed by Douglas Nelson at the University of South Florida by collecting free association data from a series of experiments and which includes measures of word relatedness for over 72,000 distinct word pairs.[6]
The SVD is typically computed using large matrix methods (for example, Lanczos methods) but may also be computed incrementally and with greatly reduced resources via a neural network-like approach, which does not require the large, full-rank matrix to be held in memory.[7] A fast, incremental, low-memory, large-matrix SVD algorithm has recently been developed.[8] MATLAB and Python implementations of these fast algorithms are available. Unlike Gorrell and Webb's (2005) stochastic approximation, Brand's algorithm (2003) provides an exact solution.
Some of LSA's drawbacks include:
LSA has been used to assist in performing prior art searches for patents.[10]
Due to its cross-domain applications in Information Retrieval, Natural Language Processing (NLP), Cognitive Science and Computational Linguistics, LSA has been implemented to support many different kinds of applications.